package com.gw.smscheck.dao.sys;


import com.gw.smscheck.entity.sys.Department;
import com.gw.smscheck.entity.sys.DeptTreeGridModel;

import java.util.List;

public interface DepartmentMapper {

    public List<Department> getChildrens(Integer pId);

    //查询菜单
    public List<Department> findDepartmentInfo(Department department);

    //添加
    public int saveDepartment(Department department);

    //修改
    public int updateDepartment(Department department);

    //删除
    public int deleteDepartment(Integer id);

    //获取所有一级菜单
    public List<Department> queryFirstSerialDept(Department department);

    //计算一级菜单数目
    public int getDepCount(Department department);

    public List<Department> queryDepartAll();


    public List<DeptTreeGridModel> getByDescribes(Department department);

    public List<DeptTreeGridModel> getChildrenById(Department department);

    /**
     * 分页查询
     * @param department
     * @return
     */
    public List<Department> pageSelect(Department department);

    /**
     * 根据id查询
     * @param department
     * @return
     */
    public Department findById(Department department);

    /**
     * 设置index值
     * @param department
     * @return
     */
    public Integer setIndex(Department department);
}
